// vite.config.ts
import { defineConfig, loadEnv } from "file:///D:/WorkSpace/ggzs_web/node_modules/.pnpm/vite@4.5.14_@types+node@20.5.1_sass@1.89.2_terser@5.43.0/node_modules/vite/dist/node/index.js";
import { createSvgIconsPlugin } from "file:///D:/WorkSpace/ggzs_web/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_8100e612e8eeedea76979f09a32d8828/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import * as path from "path";
import vue from "file:///D:/WorkSpace/ggzs_web/node_modules/.pnpm/@vitejs+plugin-vue@4.6.2_vi_1fc4446f7b90b7971204278586b088f2/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import { viteMockServe } from "file:///D:/WorkSpace/ggzs_web/node_modules/.pnpm/vite-plugin-mock@2.9.8_mock_682a681db320bb40b5551b00f3a9fc2d/node_modules/vite-plugin-mock/dist/index.js";
var __vite_injected_original_dirname = "D:\\WorkSpace\\ggzs_web";
var vite_config_default = defineConfig(({ command, mode }) => {
  let evn = loadEnv(mode, process.cwd());
  return {
    plugins: [
      vue(),
      createSvgIconsPlugin({
        // Specify the icon folder to be cached
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        // Specify symbolId format
        symbolId: "icon-[dir]-[name]"
      }),
      viteMockServe({
        localEnabled: command === "serve"
        // 保证在开发阶段可以使用mock接口
      })
    ],
    resolve: {
      alias: {
        "@": path.resolve(__vite_injected_original_dirname, "src")
      }
    },
    //scss全局变量一个配置
    css: {
      preprocessorOptions: {
        scss: {
          javascriptEnabled: true,
          additionalData: '@use "./src/style/variable.scss" as *;'
        }
      }
    },
    // 代理跨域
    server: {
      port: 3e3,
      proxy: {
        [evn.VITE_APP_BASE_API]: {
          // 获取数据的服务器的地址
          target: evn.VITE_SERVE,
          // 是否跨域
          changeOrigin: true,
          // 路径重写
          rewrite: (path2) => path2.replace(/^\/api/, "")
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uI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